﻿//-----------------------------------------------------------------------
// <copyright file="SpecifyOutputFileStep.cs" company="QUT">
//     Copyright QUT 2009.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GenerateKml.Steps
{
    /// <summary>
    /// Specify Output File Step class.
    /// </summary>
    public partial class SpecifyOutputFileStep : UserControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SpecifyOutputFileStep"/> class.
        /// </summary>
        public SpecifyOutputFileStep()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Gets the output file path.
        /// </summary>
        /// <value>The output file path.</value>
        public string OutputFilePath
        {
            get
            {
                return this.OutputFileTextBox.Text;
            }
        }

        /// <summary>
        /// Handles the Click event of the BrowseOutputFileButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void BrowseOutputFileButton_Click(object sender, EventArgs e)
        {
            this.MainSaveFileDialog.FileName = string.Empty;
            if (this.MainSaveFileDialog.ShowDialog() == DialogResult.OK)
            {
                this.OutputFileTextBox.Text = this.MainSaveFileDialog.FileName;
            }
        }
    }
}
